<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:p="http://primefaces.org/ui"
                xmlns:fn="http://java.sun.com/jsp/jstl/functions"
                template="/templates/ui.xhtml">

    <ui:define name="head">
    </ui:define>

    <ui:define name="content">
        <div id="top">
            <p:messages id="msgs" showDetail="true"/>
            <h:form id="form">
                <div style="margin-top: 5px;">
                    <p:tabView dynamic="true" cache="false" style="font-weight:normal;font-style:normal">
                        <p:tab title="对私存款利率维护">
                            <h:panelGrid columns="2" cellspacing="10">
                                <h:outputLabel value="报表日期:" style="font-weight: bold;" for="startdate"/>
                                <p:inputText id="startdate" required="true" requiredMessage="日期不能为空."
                                             value="#{personalDepAction.startdate}"
                                             onclick="WdatePicker({dateFmt:'yyyy-MM-dd'})"/>
                            </h:panelGrid>
                            <p:ajaxStatus style="height:20px;text-align:center">
                                <f:facet name="start">
                                    <h:graphicImage value="/images/ajaxloadingbar.gif"/>
                                </f:facet>
                                <f:facet name="complete">
                                    <h:outputText value=""/>
                                </f:facet>
                            </p:ajaxStatus>

                            <p:dataTable id="pdt" dynamic="true" style="width:100%;"
                                         value="#{personalDepAction.detlList}" var="record"
                                         rowKey="#{record.pkid}"
                                         selection="#{personalDepAction.selectedRecords}"
                                         paginatorTemplate="{FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown} "
                                         paginator="true" rows="50" paginatorPosition="bottom"
                                         rowsPerPageTemplate="100,50,30,15,5"
                                         emptyMessage="数据记录为空...">
                                <p:column selectionMode="multiple"/>

                                <p:column headerText="科目号" style="text-align:center">
                                    <h:outputText value="#{record.itemcode}"/>
                                </p:column>
                                <p:column headerText="科目名称" style="text-align: center">
                                    <h:outputText value="#{record.itemname}"/>
                                </p:column>
                                <p:column headerText="人民币利率">
                                    <p:cellEditor>
                                        <f:facet name="output">
                                            <h:outputText value="#{record.cnyIntr}" style="float: right" >
                                                <f:convertNumber type="number" pattern="###,##0.00000"/>
                                            </h:outputText>
                                        </f:facet>
                                        <f:facet name="input">
                                            <p:inputText value="#{record.cnyIntr}" style="width:100%" />
                                        </f:facet>
                                    </p:cellEditor>
                                </p:column>
                                <p:column headerText="美元利率">
                                    <p:cellEditor>
                                        <f:facet name="output">
                                            <h:outputText value="#{record.usdIntr}" style="float: right" >
                                                <f:convertNumber type="number" pattern="###,##0.00000"/>
                                            </h:outputText>
                                        </f:facet>
                                        <f:facet name="input">
                                            <p:inputText value="#{record.usdIntr}" style="width:100%" />
                                        </f:facet>
                                    </p:cellEditor>
                                </p:column>
                                <p:column headerText="利率是否固定" style="text-align: center">
                                    <p:cellEditor>
                                        <f:facet name="output">
                                            <h:outputText value="#{record.intrType}"/>
                                        </f:facet>
                                        <f:facet name="input">
                                            <h:selectOneMenu value="#{record.intrType}">
                                                <f:selectItems value="#{personalDepAction.rateTypeOptions}"
                                                               var="category"
                                                               itemLabel="#{category}"
                                                               itemValue="#{category}"/>
                                            </h:selectOneMenu>
                                        </f:facet>
                                    </p:cellEditor>
                                </p:column>
                                <p:column headerText="报表日期" style="text-align: center">
                                    <h:outputText value="#{record.yyyymm}"/>
                                </p:column>
                                <p:column headerText="操作" style="text-align:center">
                                    <p:rowEditor/>
                                </p:column>
                            </p:dataTable>
                        </p:tab>
                    </p:tabView>
                </div>

            </h:form>
        </div>
    </ui:define>

</ui:composition>